From ce35d523a268e8da647361394722c2eceb916b0e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Florian=20M=C3=BCllner?= Date: Fri, 16 Jan 2015 00:13:58 +0100 Subject: [PATCH] windowManager: Allow moving a window above the top workspace When using dynamic workspaces, a new workspace will be appended when moving a window down to the last (empty) workspace. It makes sense to extend the behavior in the opposite direction, and prepend a new workspace when moving a window up from the first workspace. https://bugzilla.gnome.org/show_bug.cgi?id=665764 --- js/ui/windowManager.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js index 88acd4592..2f2a0de38 100644 --- a/js/ui/windowManager.js +++ b/js/ui/windowManager.js @@ -1527,6 +1527,11 @@ const WindowManager = new Lang.Class({ direction = Meta.MotionDirection.DOWN; newWs = screen.get_workspace_by_index(screen.n_workspaces - 1); } else if (isNaN(target)) { + // Prepend a new workspace dynamically + if (screen.get_active_workspace_index() == 0 && + action == 'move' && target == 'up') + this.insertWorkspace(0); + direction = Meta.MotionDirection[target.toUpperCase()]; newWs = screen.get_active_workspace().get_neighbor(direction); } else if (target > 0) { -- 2.39.5